From 955772fac14ffea19eefbd94a4784b12147f8f66 Mon Sep 17 00:00:00 2001 From: Isaku Yamahata Date: Mon, 25 Aug 2008 19:04:37 +0900 Subject: [PATCH] [IA64] fix stack unwinder. The stack unwinder can be called in interrupt context. On the other hand xmalloc() can't be called in interrupt context. Don't call xmalloc() if in the interrupt context. Signed-off-by: Isaku Yamahata --- xen/arch/ia64/linux-xen/unwind.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/ia64/linux-xen/unwind.c b/xen/arch/ia64/linux-xen/unwind.c index ed72425ef3..d88827fad0 100644 --- a/xen/arch/ia64/linux-xen/unwind.c +++ b/xen/arch/ia64/linux-xen/unwind.c @@ -91,9 +91,9 @@ #endif #ifdef XEN -#define alloc_reg_state() xmalloc(struct unw_reg_state) +#define alloc_reg_state() ({in_irq()? NULL: xmalloc(struct unw_reg_state);}) #define free_reg_state(usr) xfree(usr) -#define alloc_labeled_state() xmalloc(struct unw_labeled_state) +#define alloc_labeled_state() ({in_irq()? NULL: xmalloc(struct unw_labeled_state);}) #define free_labeled_state(usr) xfree(usr) #else #define alloc_reg_state() kmalloc(sizeof(struct unw_reg_state), GFP_ATOMIC) -- 2.30.2